<?php
/**
 * Created by PhpStorm.
 * User: jin
 * Date: 2015/8/24
 * Time: 10:17
 */

namespace Home\Model;
use Think\Model;

class CityModel extends Model
{
    public function getCityListByProId($proId)
    {
        $sql = 'SELECT * from hospital_city WHERE pro_id = '.$proId.' ORDER BY city_sort ASC';
        return $this->query($sql);
    }
    function getCityIdByPy($py)
    {
        $cityInfo = M('city')->where(array('city_pinyin'=>$py))->find();
        return $cityInfo;
    }
}